package com.sinothk.fc.storeOrder.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sinothk.fc.storeOrderDetail.entity.StoreOrderDetailEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 门店订单表
 * @Author: Liangyt
 * @Date:   2022-09-14
 * @Version: V1.0
 */
@Data
@TableName("fc_store_order")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="fc_store_order对象", description="门店订单表")
public class StoreOrderEntity implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
	/**门店ID*/
	@Excel(name = "门店ID", width = 15)
    @ApiModelProperty(value = "门店ID")
    private String storeId;
    /**订单名称*/
    @Excel(name = "订单名称", width = 15)
    @ApiModelProperty(value = "订单名称")
    private String orderName;
	/**订单实收总价*/
	@Excel(name = "订单实收总价", width = 15)
    @ApiModelProperty(value = "订单实收总价")
    private Long orderIncomePrice;
    /**订单标价总价*/
    @Excel(name = "订单标价总价", width = 15)
    @ApiModelProperty(value = "订单标价总价")
    private Long orderFlagAllPrice;
    /**订单单价*/
    @Excel(name = "订单单价", width = 15)
    @ApiModelProperty(value = "订单单价")
    private Long goodsSalePrice;
    /**订单数量*/
    @Excel(name = "订单数量", width = 15)
    @ApiModelProperty(value = "订单数量")
    private Double goodsNum;
    /**订单描述*/
    @Excel(name = "订单描述", width = 15)
    @ApiModelProperty(value = "订单描述")
    private String orderDesc;
    /**状态:0待缴费1已缴费2赊账9退款*/
    @Excel(name = "状态:0待缴费1已缴费2赊账9退款", width = 15)
    @ApiModelProperty(value = "状态:0待缴费1已缴费2赊账9退款")
    private Integer state;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**操作人*/
    @ApiModelProperty(value = "操作人")
    private String optBy;
    /**交易对象ID*/
    @Excel(name = "交易对象ID", width = 15)
    @ApiModelProperty(value = "交易对象ID")
    private String traderId;
    /**交易对象姓名*/
    @Excel(name = "交易对象姓名", width = 15)
    @ApiModelProperty(value = "交易对象姓名")
    private String traderName;
    /**交易对象头像*/
    @Excel(name = "交易对象头像", width = 15)
    @ApiModelProperty(value = "交易对象头像")
    private String traderAvatar;
    /**交易对象电话*/
    @Excel(name = "交易对象电话", width = 15)
    @ApiModelProperty(value = "交易对象电话")
    private String traderPhone;
    /**
     * 销售模式：0计件销售、1多件组合销售、2称重销售
     */
    private int orderModel;

    // ======================================== 非表字段 ========================
    /**收入*/
    @Excel(name = "收入", width = 15)
    @ApiModelProperty(value = "收入")
    private Long income;

    /**
     * 订单商品列表
     */
    @TableField(exist = false)
    private List<StoreOrderDetailEntity> orderRecords;
}
